/*
 * hudong.com Inc.
 * Copyright (c) 2000-2004 All Rights Reserved.
 */
package middlegen.plugins.ibatis.config;

public class ColumnConfig {
    /** name of the column, it's the name in database */
    private String name;

    /** the java type of the column, used to override default mapping by middlegen */
    private String javaType;

    //<add author="jdyao" time="2009-08-21">
    private String jdbcType;

    private String typeHandler;

    //</add>

    /**
     * Constructor for IWalletFieldConfig.
     */
    public ColumnConfig() {
        super();
    }

    /**
     * @return
     */
    public String getJavaType() {
        return javaType;
    }

    /**
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     * @param string
     */
    public void setJavaType(String string) {
        javaType = string;
    }

    /**
     * @param string
     */
    public void setName(String string) {
        if (string != null) {
            name = string.toLowerCase();
        } else {
            name = null;
        }
    }

    public String getJdbcType() {
        return jdbcType;
    }

    public void setJdbcType(String jdbcType) {
        this.jdbcType = jdbcType;
    }

    public String getTypeHandler() {
        return typeHandler;
    }

    public void setTypeHandler(String typeHandler) {
        this.typeHandler = typeHandler;
    }

    /**
     * @return
     *
     * @see java.lang.Object#toString()
     */
    public String toString() {
        StringBuffer sb = new StringBuffer();

        sb.append("[name=").append(name).append(", javaType=").append(javaType).append(
            " , typeHandler=").append(typeHandler).append("]");

        return sb.toString();
    }
}
